e312aae7c4df7d45f77d9a896957e2c0c01e609d,plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/validation/AnnotationIssueProcessor.java,AnnotationIssueProcessor,updateMarkerAnnotations,#Multimap#IProgressMonitor#,137
Before Change
return;
}
@SuppressWarnings("unchecked")
Iterator<Annotation> annotationIterator = annotationModel.getAnnotationIterator();
while (annotationIterator.hasNext()) {
if (monitor.isCanceled()) {
return;
}
Annotation annotation = annotationIterator.next();
if (isRelevantAnnotationType(annotation.getType()) && (annotation instanceof MarkerAnnotation)) {
Position markerAnnotationPosition = annotationModel.getPosition(annotation);
final MarkerAnnotation markerAnnotation = (MarkerAnnotation) annotation;
Collection<Annotation> sourceAnnotations = positionToAnnotations.get(markerAnnotationPosition);
boolean markAsDeleted = true;
if (null != sourceAnnotations) {
markAsDeleted = filter(sourceAnnotations, new Predicate<Annotation>() {
public boolean apply(Annotation sourceAnnotation) {
return sourceAnnotation.getText().equals(markerAnnotation.getText())
&& sourceAnnotation.getType().equals(markerAnnotation.getType());
}
}).isEmpty();
}
markerAnnotation.markDeleted(markAsDeleted);
}
}
}
After Change
if (monitor.isCanceled()) {
return;
}
Iterator<MarkerAnnotation> annotationIterator = Iterators.filter(annotationModel.getAnnotationIterator(), MarkerAnnotation.class);
// every marker produced by fast validation can be marked as deleted.
// If its predicate still holds, the validation annotation will covered anyway.
while (annotationIterator.hasNext() && !monitor.isCanceled()) {
final MarkerAnnotation annotation = annotationIterator.next();
try {
if(isRelevantAnnotationType(annotation.getType()))
annotation.markDeleted(annotation.getMarker().isSubtypeOf(MarkerTypes.FAST_VALIDATION));
} catch (CoreException e) {
// marker type cannot be resolved - keep state of annotation
}